Atomic force microscope based infrared spectroscopy (AFM-IR) provides chemical characterization and compositional mapping on nanometer length scales by using the tip of an atomic force microscope to locally detect absorption of infrared radiation.